<!DOCTYPE html>
<html lang="zh">
<head>
<title>促销规则管理 | OMS</title>
<meta charset="utf-8" />

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="Thu, 19 Nov 1900 08:52:00 GMT" />
<!-- 加载 bootstrap 样式-->
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/jquery-ui-1.10.4.custom/css/ui-lightness/jquery-ui-1.10.4.custom.min.css" />
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/font-awesome/css/font-awesome.min.css" />
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/bootstrap/css/bootstrap.min.css" />

<!-- 加载本页需要的三方插件样式 -->
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/DataTables/media/css/jquery.dataTables.css">
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/DataTables/extensions/TableTools/css/dataTables.tableTools.min.css">
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/DataTables/media/css/dataTables.bootstrap.css">
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/jquery-tablesorter/themes/blue/style-custom.css">
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/jquery-bootstrap-wizard/custom.css">
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/jquery-steps/css/jquery.steps.css">
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/animate.css/animate.css" />
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/iCheck/skins/all.css" />
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css">

<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/select2/select2-madmin.css">
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/bootstrap-select/bootstrap-select.min.css">

<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/bootstrap-daterangepicker/daterangepicker-bs3.css">
<!-- 加载主题风格样式 -->
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/css/themes/style1/orange-blue.css" class="default-style" />
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/css/themes/style1/orange-blue.css" id="theme-change"
    class="style-change color-change" />
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/css/style-responsive.css" />
<link type="text/css" rel="stylesheet" href="/css/tooltip.css" />
<style>
th, td {
    white-space: nowrap;
}

div.dataTables_wrapper {
    margin: 0 auto;
}

table.DTFC_Cloned {
    padding: 1px !important;
}

.overflow {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.top {
    margin-top: 5px;
}
</style>
</head>

<body class="">
    <!--BEGIN CONTENT-->
    <div class="page-content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-8 col-xs-8 col-sm-8 col-md-8">
                    <button id="btnAddRule" style="margin-top: 12px;" type="button" class="btn btn-info btn-xs">
                            <i class="fa"></i>&nbsp;新建规则
                    </button>
                    <button id="btnDeleteRule" style="margin-top: 12px;display:none;" type="button" class="btn btn-danger btn-xs">
                          <i class="fa"></i>&nbsp;批量删除
                    </button>
                </div>
                <div class="col-lg-4 col-xs-4 col-sm-4 col-md-4" style="margin-bottom: 10px;">
                    <div class="input-group">
                        <input id="quickSearch" type="text" placeholder="规则名称" class="form-control" /> <span class="input-group-btn">
                            <button id="btnQuickSearch" type="button" class="btn btn-primary">
                                <i class="fa fa-search"></i>
                            </button>
                            <button id="btnAdvSearch" type="button" class="btn btn-default btn-adv-search">
                                <i class="fa fa-angle-double-down" style="font-size: 20px; color: white;"></i>
                            </button>
                        </span>
                    </div>
                </div>
            </div>
            <!-- 高级查询 -->
            <div class="row">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <div class="portlet box portlet-blue tabbable" style="margin-bottom:0px;">
                        <div class="panel panel-default" id="advSearchPanel" style="display: none;">
                            <!-- 窗体悬浮，百分比根据情况设置 -->
                            <div class="panel-body">
                                <form id="frmAdvSearch" role="form" action="" class="form-horizontal advance-query">
                                    <!-- advance-query 必须要写的 -->
                                    <div class="row">
                                        <div class="col-lg-3 col-xs-3 col-sm-3 col-md-3">
                                            <div class="form-group">
                                                <label for="dateType" class="col-sm-4 col-lg-4 col-xs-4 col-md-4 control-label">赠送方式 </label>
                                                <div class="col-sm-8 col-lg-8 col-xs-8 col-md-8">
                                                    <select id="querySendType" name="querySendType" class="form-control  selectpicker"
                                                        fieldname="" fieldtype="string" fieldoperator="">
                                                        <option value="">请选择</option>
                                                        <option value="buySend">买就送</option>
                                                        <option value="fullSend">满就送</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-lg-3 col-xs-3 col-sm-3 col-md-3">
                                            <div class="form-group">
                                                <label for="shopName" class="col-sm-4 col-lg-4 col-xs-4 col-md-4 control-label">店铺 </label>
                                                <div class="col-sm-8 col-lg-8 col-xs-8 col-md-8">
                                                    <select id="projectShopList" name="projectShopList" class="form-control selectpicker"
                                                        fieldname="" fieldtype="string" fieldoperator="">
                                                        <option value="">请选择</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    
                                        <div class="col-lg-3 col-xs-3 col-sm-3 col-md-3">
                                            <div class="form-group">
                                                <label for="orderCode" class="col-sm-4 col-lg-4 col-xs-4 col-md-4 control-label">限定商品 </label>
                                                <div class="col-sm-8 col-lg-8 col-xs-8 col-md-8">
                                                    <input id="queryConstrainGoods" name="queryConstrainGoods" type="text" placeholder="" minlength="1"
                                                        maxlength="100" class="form-control " fieldname="o.trade_code"
                                                        fieldtype="string" fieldoperator="and" />
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-lg-3 col-xs-3 col-sm-3 col-md-3">
                                            <div class="form-group">
                                                <label for="orderCode" class="col-sm-4 col-lg-4 col-xs-4 col-md-4 control-label">赠品 </label>
                                                <div class="col-sm-8 col-lg-8 col-xs-8 col-md-8">
                                                    <input id="queryGift" name="queryGift" type="text" placeholder="" minlength="1"
                                                        maxlength="100" class="form-control "/>
                                                </div>
                                            </div>
                                        </div>
                                        
                                    </div>
                                    <div class="row">
                                        <div class="col-lg-3 col-xs-3 col-sm-3 col-md-3">
                                            <div class="form-group">
                                                <label for="dateType" class="col-sm-4 col-lg-4 col-xs-4 col-md-4 control-label">时间类型 </label>
                                                <div class="col-sm-8 col-lg-8 col-xs-8 col-md-8">
                                                    <select id="queryDateType" name="queryDateType" class="form-control selectpicker"
                                                        fieldname="" fieldtype="string" fieldoperator="">
                                                        <option value="">请选择</option>
                                                        <option value="0">付款时间</option>
                                                        <option value="1">拍单时间</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-lg-3 col-xs-3 col-sm-3 col-md-3">
                                            <div class="form-group">
                                                <label class="col-sm-4 col-lg-4 col-xs-4 col-md-4 control-label">时间区间 </label>
                                                <div class="col-sm-8 col-lg-8 col-xs-8 col-md-8">
                                                    <div class="btn btn-default reportrange">
                                                        <i class="fa fa-calendar"></i>&nbsp;&nbsp;<span>请选择时间区间</span>&nbsp;&nbsp; <i
                                                            class="fa fa-angle-down"></i> <input type="hidden" id="queryDateStart" name="queryDateStart" />
                                                        <input type="hidden" id="queryDateEnd" name="queryDateEnd" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-12 col-lg-12 col-xs-12 col-md-12 text-right">
                                            <button type="reset" id="advSearchReset" name="advSearchReset" class="btn btn-default">重置</button>
                                            <button type="button" id="advSearchSubmit" name="advSearchSubmit" class="btn btn-primary">查询</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="row">
                <div class="col-lg-12">
                    <div class="portlet box portlet-blue tabbable">
                        <div class="portlet-header">
                            <div class="caption">促销规则列表</div>
                        </div>
                        <div class="portlet-body">
                            <div class="tabbable portlet-tabs">
                                <ul class="nav nav-tabs">
                                   <!--  <li>
                                        <button id="btnDeleteRule" style="margin-top: 12px;" type="button" class="btn btn-warning btn-xs">
                                            <i class="fa fa-trash-o"></i>&nbsp;批量删除
                                        </button>
                                    </li>
                                    <li>
                                        <button id="btnAddRule" style="margin-top: 12px;" type="button" class="btn btn-warning btn-xs">
                                            <i class="fa fa-plus"></i>&nbsp;新建规则
                                        </button>
                                    </li> -->
                                    <li id="btnLoadExpireRule"><a href="javascript:void(0)" data-toggle="tab">过期(<span id="expireNum">0</span>)
                                    </a></li>
                                    <li id="btnLoadDisableRule"><a href="javascript:void(0)" data-toggle="tab">停用(<span id="disableNum">0</span>)
                                    </a></li>
                                    <li id="btnLoadRunningRule"><a href="javascript:void(0)" data-toggle="tab">启用(<span
                                            id="runningNum">0</span>)
                                    </a></li>
                                    <li class="active" id="btnLoadForbidRule"><a href="javascript:void(0)" data-toggle="tab">未启用(<span id="forbidNum">0</span>)
                                    </a></li>
                                </ul>

<div class="tab-content">
                                    <!-- 待审核div -->
                                    <div class="tab-pane fade in active">
                                        <div class="table-responsive">
                                            <table id="ruleTable" name="ruleTable"
                                                class="table table-hover table-striped table-bordered table-advanced tb-sticky-header tablefirst"
                                                cellspacing="0" style="width: 100%; table-layout: fixed;">
                                                <thead>
                                                    <tr>
                                                        <th width="2%" colValue="checkbox"><input type="checkbox" id="selecteAll"  style="display:none;"/></th>
                                                        <th width="15%" colValue="ruleName">规则名称</th>
                                                        <th width="15%" colValue="ruleType">规则类型</th>
                                                        <th width="5%" colValue="status">状态</th>
                                                        <th width="8%" colValue="countingDateTypeStr">时间类型</th>
                                                        <th width="10%" colValue="countingDateStart">开始时间</th>
                                                        <th width="10%" colValue="countingDateEnd">结束时间</th>
                                                        <th width="10%" colValue="createTime">创建时间</th>
                                                        <th width="25%" colValue="envolvingShops">活动店铺</th>
                                                        <th width="0%" colValue="ruleDescription">说明</th>
                                                        <th width="25%" mincolValue="operation">操作</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- ====================================== modal窗口区 ===================================== -->
    <!-- 新增窗口IFrame版本 -->
    <div id="ruleIframeWindow" shopid="" tabindex="-1" role="dialog" aria-labelledby="modal-header-primary-label" data-backdrop="static"
        aria-hidden="true" class="modal fade">
        <div class="modal-dialog modal-wide-width">
            <div class="modal-content">
                <div class="modal-header modal-header-primary">
                    <button type="button" data-dismiss="modal" aria-hidden="true" class="close">&times;</button>
                    <h4 id="modal-header-primary-label" class="modal-title"
                        style="display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">促销规则</h4>
                </div>
                <div class="modal-body">
                    <div id="flat-skin" class="row skin skin-flat">
                        <iframe id="ifmRuleEdit" name="ifmRuleEdit" allowtransparency="true" style="" title="test" frameborder="0"
                            width="100%" height="500px" scrolling="auto"></iframe>
                    </div>
                </div>
                <div class="modal-footer">
                    <button id="btnClose" type="button" data-dismiss="modal" class="btn btn-default">关闭</button>
                    <button id="btnSave" type="button" class="btn btn-primary">保存</button>
                </div>
            </div>
        </div>
    </div>
    <!-- 新增窗口 -->
    </body>
    <!--END CONTENT -->
        <!-- 加载 jquery js-->
        <script src="/Apollo/madmin/js/jquery-1.10.2.min.js"></script>
        <script src="/Apollo/madmin/js/jquery-migrate-1.2.1.min.js"></script>
        <script src="/Apollo/madmin/js/jquery-ui.js"></script>

        <!-- 加载 bootstrap 和三方插件 js -->
        <script src="/Apollo/madmin/vendors/bootstrap/js/bootstrap.min.js"></script>
        <script src="/Apollo/madmin/vendors/bootstrap-hover-dropdown/bootstrap-hover-dropdown.js"></script>
        <script src="/Apollo/madmin/js/html5shiv.js"></script>
        <script src="/Apollo/madmin/js/respond.min.js"></script>
        <script src="/Apollo/madmin/vendors/jquery-cookie/jquery.cookie.js"></script>
        <script src="/Apollo/madmin/vendors/iCheck/icheck.min.js"></script>
        <script src="/Apollo/madmin/vendors/iCheck/custom.min.js"></script>
        <script src="/Apollo/madmin/vendors/jquery-notific8/jquery.notific8.min.js"></script>
        <script src="/Apollo/madmin/vendors/jquery-pace/pace.min.js"></script>
        <script src="/Apollo/madmin/vendors/holder/holder.js"></script>
        <script src="/Apollo/madmin/vendors/responsive-tabs/responsive-tabs.js"></script>
        <script src="/Apollo/madmin/vendors/moment/moment.js"></script>
        <script src="/Apollo/madmin/vendors/bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script>
        <script src="/Apollo/madmin/vendors/DataTables/media/js/jquery.dataTables.js"></script>
        <script src="/Apollo/madmin/vendors/DataTables/media/js/dataTables.bootstrap.js"></script>
        <script src="/Apollo/madmin/vendors/DataTables/extensions/TableTools/js/dataTables.tableTools.min.js"></script>
        <script src="/Apollo/madmin/vendors/jquery-tablesorter/jquery.tablesorter.js"></script>
        <script src="/Apollo/madmin/js/table-advanced.js"></script>

        <script src="/Apollo/madmin/vendors/jquery-validate/jquery.validate.min.js"></script>
        <script src="/Apollo/madmin/vendors/jquery-validate/message_zh.js"></script>
        <script src="/Apollo/madmin/vendors/bootstrap-maxlength.js"></script>
        <script src="/Apollo/madmin/vendors/jquery-inputmask/jquery.inputmask.bundle.min.js"></script>



        <!-- 加载本页面对应的js -->
        <script src="/Apollo/madmin/vendors/select2/select2.min.js"></script>
        <script src="/Apollo/madmin/vendors/bootstrap-select/bootstrap-select.min.js"></script>
        <script src="/Apollo/madmin/vendors/bootstrap-daterangepicker/daterangepicker.js"></script>

        <script src="salespromotionrule.js"></script>
        <script src="/views/static/js/export.js"></script>
        <script src="/views/static/js/form.js"></script>
        <script src="/views/static/js/jquery.validate.extend.js"></script>
</html>